package pub.wkq.springboot.pojo;

import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;

import java.util.Date;
import java.util.List;

/**
 * <h1>定义 Taco 类</h1>
 *
 * @author 王开琦
 */
@Data
public class Taco {
    private Long id;
    private Date placeAt = new Date();
    @NotNull
    @Size(min = 5, message = "名称最小为5个字符长！")
    private String name;
    @NotNull
    @Size(min = 1,message = "你必须选择最少一种配料！")
    private List<Ingredient> ingredients;
}
